let xny =
  /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([A-HJ-K][A-HJ-NP-Z0-9][0-9]{4}$))/;
let ryc =
  /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
export default {
  goOutContent1: [
    { title: "车牌号", dataIndex: "vehicleNo" },
    { title: "出口站", dataIndex: "deptName" },
    { title: "查验时间", dataIndex: "checkTime" },
    { title: "服务器接收时间", dataIndex: "receiveTime" },
    { title: "上传不及时", dataIndex: "lateFile", isFile: true,dialogTitle:'上传不及时' },
    { title: "整改结果", dataIndex: "resultFile", isFile: true,dialogTitle:'整改结果' },
    {
      title: "操作",
      key: "operation",
      dataIndex: "operation",
      width: 250,
      dispaly: true,
      slot: true,
      fixed: "right",
    },
  ],
  goOutContent4: [
    { title: "入口站名", dataIndex: "entryName" },
    { title: "入口公司", dataIndex: "companyName" },
    { title: "出口站名", dataIndex: "exitName" },
    { title: "入口时间", dataIndex: "entryTime" },
    { title: "出口时间", dataIndex: "exitTime" },
    { title: "入口车型", dataIndex: "entryVehicleType" },
    { title: "出口车型", dataIndex: "exitVehicleType" },
    { title: "卡号", dataIndex: "cardNo" },
    { title: "入口收费员编号", dataIndex: "entryPersonCode" },
    { title: "出口收费员编号", dataIndex: "exitPersonCode" },
    { title: "出口收费员名称", dataIndex: "exitPersonName" },
    { title: "收费金额（分）", dataIndex: "fee" },
    { title: "出口车牌", dataIndex: "exitVehicleNo" },
    { title: "出口改错", dataIndex: "exitError" },
    { title: "图片证据", dataIndex: "proofImg", isImg: true },
    // { title: "收费站编码", dataIndex: "stationCode" },
    { title: "备注", dataIndex: "remark" },
    {
      title: "操作",
      key: "operation",
      dataIndex: "operation",
      width: 250,
      dispaly: true,
      slot: true,
      fixed: "right",
    },
  ],
  goOutContent3: [
    { title: "收费站编码", dataIndex: "stationCode" ,width:140},
    { title: "PASSID", dataIndex: "passid" },
    { title: "入口站名", dataIndex: "deptName" },
    { title: "入口公司", dataIndex: "entryCompany" },
    { title: "入口时间", dataIndex: "entryTime" },
    { title: "车牌号", dataIndex: "plateNo" },
    { title: "入口车型", dataIndex: "vehicleType" },
    { title: "入口车种", dataIndex: "vehicleKind" },
    { title: "入口总量", dataIndex: "axlesNo" },
    { title: "入口车轴数", dataIndex: "axlesNo" },
    { title: "卡号", dataIndex: "cardNo" },
    { title: "系统分析丢轴", dataIndex: "lostAxles" },
    { title: "入口实际轴数", dataIndex: "realAxles" },
    { title: "治超图片", dataIndex: "exceedImg", isImg: true },
    { title: "状态", dataIndex: "status",render:(text)=>{
      if(text==0)return "未完成"
      if(text==1)return "已完成"
     }},
    { title: "填报人", dataIndex: "userName" },
 
    { title: "备注", dataIndex: "remark" },
    {
      title: "操作",
      key: "operation",
      dataIndex: "operation",
      width: 250,
      dispaly: true,
      slot: true,
      fixed: "right",
    },
  ],
  goOutContent2: [
    { title: "操作", dataIndex: "operate" },
    { title: "车牌号", dataIndex: "vehicleNo" },
    { title: "处理状态", dataIndex: "operateStatus" },
    { title: "查验时间", dataIndex: "checkTime" },
    { title: "收费站名称", dataIndex: "deptName" },
    { title: "出口交易编号", dataIndex: "dealNo" },
    { title: "出口交易时间", dataIndex: "dealTime" },
    { title: "PASSID", dataIndex: "passId" },
    { title: "通行介质", dataIndex: "passEntity" },
    { title: "交易支付方式", dataIndex: "payMethod" },
    { title: "车辆状态标识", dataIndex: "vehicleStatus" },
    { title: "处理结果文件", dataIndex: "resultFile", isFile: true,dialogTitle:'应急查验' },
    {
      title: "操作",
      key: "operation",
      dataIndex: "operation",
      width: 250,
      dispaly: true,
      slot: true,
      fixed: "right",
    },
  ],

  formItemConfig1: [
    {
      label: "车牌号",
      prop: "vehicleNo",
      component: "input",
      placeholder: "请输入",
      span: 12,
      rules: [
        { required: true, message: "车牌号不能为空", trigger: "blur" },
        {
          validator: (rule, value, callback) => {
            if (!xny.test(value) && !ryc.test(value)) {
              callback(new Error("请输入正确的车牌号"));
            } else {
              callback();
            }
          },
          trigger: "blur",
        },
      ],
    },
    {
      label: "出口站",
      prop: "deptId",
      component: "tree",
      placeholder: "请选择",
      span: 12,
    },
    {
      label: "查验时间",
      prop: "checkTime",
      component: "date",
      clearable: true,
      type: "datetime",
      format: "YYYY-MM-DD HH:mm:ss'",
      span: 12,
      width: "50%",
    },
    {
      label: "服务器接收时间",
      prop: "receiveTime",
      component: "date",
      clearable: true,
      type: "datetime",
      format: "YYYY-MM-DD HH:mm:ss'",
      span: 12,
      width: "50%",
      labelWidth: "140px",
    },
    {
      label: "上传不及时文件",
      prop: "lateFile",
      component: "file",
      placeholder: "请输入",
      span: 12,
      labelWidth: "120px",
    },
    // {
    //   label: "整改结果文件",
    //   prop: "resultFile",
    //   component: "file",
    //   placeholder: "请输入",
    //   span: 12,
    //   labelWidth: "110px",
    // },
  ],
  formItemConfig2: [
    {
      label: "收费站",
      prop: "deptId",
      component: "tree",
      placeholder: "请选择",
      span: 12,
    },
    {
      label: "操作",
      prop: "operate",
      component: "input",
      placeholder: "请输入",
      span: 12,
      labelWidth: "120px",
    },
    {
      label: "车牌号",
      prop: "vehicleNo",
      component: "input",
      placeholder: "请输入",
      span: 12,
      labelWidth: "120px",
      rules: [
        { required: true, message: "车牌号不能为空", trigger: "blur" },
        {
          validator: (rule, value, callback) => {
            if (!xny.test(value) && !ryc.test(value)) {
              callback(new Error("请输入正确的车牌号"));
            } else {
              callback();
            }
          },
          trigger: "blur",
        },
      ],
    },
    {
      label: "查验时间",
      prop: "checkTime",
      component: "date",
      clearable: true,
      type: "datetime",
      format: "YYYY-MM-DD HH:mm:ss'",
      span: 12,
      width: "50%",
      labelWidth: "120px",
    },
    {
      label: "出口交易编号",
      prop: "dealNo",
      component: "input",
      placeholder: "请输入",
      span: 12,
      labelWidth: "120px",
    },
    {
      label: "出口交易时间",
      prop: "dealTime",
      component: "date",
      clearable: true,
      type: "datetime",
      format: "YYYY-MM-DD HH:mm:ss'",
      span: 12,
      width: "50%",
      labelWidth: "120px",
    },
    {
      label: "PASSID",
      prop: "passId",
      component: "input",
      placeholder: "请输入",
      span: 12,
      labelWidth: "120px",
    },
    {
      label: "通行介质",
      prop: "passEntity",
      component: "input",
      placeholder: "请输入",
      span: 12,
      labelWidth: "120px",
    },
    {
      label: "交易支付方式",
      prop: "payMethod",
      component: "input",
      placeholder: "请输入",
      span: 12,
      labelWidth: "120px",
    },
    {
      label: "处理状态",
      prop: "operateStatus",
      component: "input",
      placeholder: "请输入",
      span: 12,
      labelWidth: "120px",
    },
    {
      label: "车辆状态标识",
      prop: "vehicleStatus",
      component: "input",
      placeholder: "请输入",
      span: 12,
      labelWidth: "120px",
    },
    {
      span: 12,
    },
    {
      label: "处理结果文件",
      prop: "resultFile",
      component: "file",
      placeholder: "请输入",
      span: 12,
      labelWidth: "120px",
      isEnd:true
    },
  ],
  formItemConfig3: [
    {
      label: "收费站",
      prop: "deptId",
      component: "tree",
      placeholder: "请选择",
      span: 12,
    },
    // {
    //   label: "月份",
    //   prop: "month",
    //   component: "date",
    //   clearable: true,
    //   type: "month",
    //   format: "YYYY-MM",
    //   span: 12,
    // },
    {
      label: "PASSID",
      prop: "passid",
      component: "input",
      placeholder: "请输入",
      span: 12,
    },
    {
      label: "入口站名称",
      prop: "deptName",
      component: "input",
      placeholder: "请输入",
      span: 12,
      labelWidth: 100,
    },
    {
      label: "入口公司",
      prop: "entryCompany",
      component: "input",
      placeholder: "请输入",
      span: 12,
    },
    {
      label: "入口时间",
      prop: "entryTime",
      component: "date",
      clearable: true,
      type: "datetime",
      span: 12,
    },
    {
      label: "车牌号",
      prop: "plateNo",
      component: "input",
      placeholder: "请输入",
      span: 12,
      rules: [
        { required: true, message: "车牌号不能为空", trigger: "blur" },
      
      ],
    },
    {
      label: "入口车型",
      prop: "vehicleType",
      component: "input",
      placeholder: "请输入",
      span: 12,
    },
    {
      label: "入口车种",
      prop: "vehicleKind",
      component: "input",
      placeholder: "请输入",
      span: 12,
    },

    {
      label: "入口总量",
      prop: "entryWeight",
      component: "input",
      placeholder: "请输入",
      isRule:true,
      span: 12,
    },
    {
      label: "入口车轴数",
      prop: "axlesNo",
      component: "input",
      placeholder: "请输入",
      span: 12,
      labelWidth: 100,
    },
    {
      label: "卡号",
      prop: "cardNo",
      component: "input",
      placeholder: "请输入",
      span: 12,
    },
    {
      label: "系统分析丢轴",
      prop: "lostAxles",
      component: "input",
      placeholder: "请输入",
      span: 12,
      labelWidth: 110,
    },
    {
      label: "入口实际轴数",
      prop: "realAxles",
      component: "input",
      placeholder: "请输入",
      span: 12,
      labelWidth: 110,
      isRule:true,
      isEnd:true
    },
    {
      label: "治超图片",
      prop: "exceedImg",
      component: "img",
      placeholder: "请输入",
      span: 12,
      isRule:true,
      isEnd:true
    },

    {
      label: "备注",
      prop: "remark",
      component: "input",
      type: "textarea",
      placeholder: "请输入",
      span: 24,
      isEnd:true,
      isRule: true,
    },
  ],
  formItemConfig4: [
    {
      label: "收费站",
      prop: "deptId",
      component: "tree",
      placeholder: "请选择",
      span: 12,
      labelWidth: "110px",
    },
    {
      label: "入口站名",
      prop: "entryName",
      component: "input",
      placeholder: "请输入",
      span: 12,
      labelWidth: "110px",
    },
    {
      label: "入口公司",
      prop: "companyName",
      component: "input",
      placeholder: "请输入",
      span: 12,
      labelWidth: "110px",
    },
    {
      label: "出口站名",
      prop: "exitName",
      component: "input",
      placeholder: "请输入",
      span: 12,
      labelWidth: "110px",
    },

    {
      label: "入口时间",
      prop: "entryTime",
      component: "date",
      clearable: true,
      type: "datetime",
      span: 12,
      labelWidth: "110px",
    },
    {
      label: "出口时间",
      prop: "exitTime",
      component: "date",
      clearable: true,
      type: "datetime",
      span: 12,
      labelWidth: "110px",
    },
    {
      label: "入口车型",
      prop: "entryVehicleType",
      component: "input",
      placeholder: "请输入",
      span: 12,
      labelWidth: "110px",
    },
    {
      label: "出口车型",
      prop: "exitVehicleType",
      component: "input",
      placeholder: "请输入",
      span: 12,
      labelWidth: "110px",
    },
    {
      label: "卡号",
      prop: "cardNo",
      component: "input",
      placeholder: "请输入",
      span: 12,
      labelWidth: "110px",
    },
    {
      label: "入口收费编号",
      prop: "entryPersonCode",
      component: "input",
      placeholder: "请输入",
      span: 12,
      labelWidth: "110px",
    },
    {
      label: "出口收费编号",
      prop: "exitPersonCode",
      component: "input",
      placeholder: "请输入",
      span: 12,
      labelWidth: "110px",
    },
    {
      label: "出口收费员名称",
      prop: "exitPersonName",
      component: "input",
      placeholder: "请输入",
      span: 12,
      labelWidth: "120px",
    },
    {
      label: "收费金额（分）",
      prop: "fee",
      component: "input",
      placeholder: "请输入",
      span: 12,
      labelWidth: "120px",
    },
    {
      label: "出口车牌",
      prop: "exitVehicleNo",
      component: "input",
      placeholder: "请输入",
      span: 12,
      labelWidth: "110px",
    },
    {
      label: "出口改错",
      prop: "exitError",
      component: "input",
      placeholder: "请输入",
      span: 12,
      labelWidth: "110px",
      isEnd:true,
      isRule: true,
    },
    {
      label: "图片证据",
      prop: "proofImg",
      component: "img",
      placeholder: "请输入",
      span: 12,
      labelWidth: "110px",
      isEnd:true,
      isRule: true,
    },

    {
      label: "备注",
      prop: "remark",
      component: "input",
      type: "textarea",
      placeholder: "请输入",
      span: 24,
      labelWidth: "110px",
      isEnd:true,
      isRule: true,
    },
  ],
  rules2:{
    vehicleNo: [
      { required: true, message: "车牌号不能为空", trigger: "blur" },
      {
        validator: (rule, value, callback) => {
          if (!xny.test(value) && !ryc.test(value)) {
            callback(new Error("请输入正确的车牌号"));
          } else {
            callback();
          }
        },
        trigger: "blur",
      },
    ],
  }
  
};
